package com.uca.authority.conf.service.impl;

import java.util.List;
import com.uca.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.uca.authority.conf.mapper.UcaConfMapper;
import com.uca.authority.conf.domain.UcaConf;
import com.uca.authority.conf.service.IUcaConfService;
import com.uca.common.core.text.Convert;

/**
 * UCA-配置Service业务层处理
 * 
 * @author 刘殿生
 * @date 2021-03-30
 */
@Service
public class UcaConfServiceImpl implements IUcaConfService 
{
    @Autowired
    private UcaConfMapper ucaConfMapper;

    /**
     * 查询UCA-配置
     * 
     * @param id UCA-配置ID
     * @return UCA-配置
     */
    @Override
    public UcaConf selectUcaConfById(Long id)
    {
        return ucaConfMapper.selectUcaConfById(id);
    }

    /**
     * 查询UCA-配置列表
     * 
     * @param ucaConf UCA-配置
     * @return UCA-配置
     */
    @Override
    public List<UcaConf> selectUcaConfList(UcaConf ucaConf)
    {
        return ucaConfMapper.selectUcaConfList(ucaConf);
    }

    /**
     * 新增UCA-配置
     * 
     * @param ucaConf UCA-配置
     * @return 结果
     */
    @Override
    public int insertUcaConf(UcaConf ucaConf)
    {
        ucaConf.setCreateTime(DateUtils.getNowDate());
        return ucaConfMapper.insertUcaConf(ucaConf);
    }

    /**
     * 修改UCA-配置
     * 
     * @param ucaConf UCA-配置
     * @return 结果
     */
    @Override
    public int updateUcaConf(UcaConf ucaConf)
    {
        ucaConf.setUpdateTime(DateUtils.getNowDate());
        return ucaConfMapper.updateUcaConf(ucaConf);
    }

    /**
     * 删除UCA-配置对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteUcaConfByIds(String ids)
    {
        return ucaConfMapper.deleteUcaConfByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除UCA-配置信息
     * 
     * @param id UCA-配置ID
     * @return 结果
     */
    @Override
    public int deleteUcaConfById(Long id)
    {
        return ucaConfMapper.deleteUcaConfById(id);
    }

	@Override
	public UcaConf selectUcaConfBysourceFlag(String sourceFlag) {
		// TODO Auto-generated method stub
		return ucaConfMapper.selectUcaConfBysourceFlag(sourceFlag);
	}
}
